package com.dlq.cloud.service;

import com.dlq.cloud.fallback.LoginClientServiceFallBackFactory;
import com.dlq.cloud.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value="CLOUD-PROVIDER-LOGIN",fallbackFactory = LoginClientServiceFallBackFactory.class)
@Component
public interface LoginClientService {

    @RequestMapping(value="/user/{userName}",method= RequestMethod.GET)
    public User getUserByName(@PathVariable(value="userName") String userName);
}
